<template>
    <div>
      <h1>选择付款方式</h1>
      <a-radio-group v-model="paymentMethod">
        <a-radio value="wechat">微信支付</a-radio>
        <a-radio value="alipay">支付宝支付</a-radio>
      </a-radio-group>
  
      <a-button type="primary" @click="pay">确认付款</a-button>
    </div>
  </template>
  
  <script>
  import { ref } from 'vue';
  
  export default {
    setup() {
      const paymentMethod = ref('wechat');
  
      const pay = () => {
        if (paymentMethod.value === 'wechat') {
          // 调用微信支付接口
          console.log('发起微信支付');
        } else if (paymentMethod.value === 'alipay') {
          // 调用支付宝支付接口
          console.log('发起支付宝支付');
        }
      };
  
      return {
        paymentMethod,
        pay
      };
    }
  };
  </script>